<script setup>
import { ref } from 'vue';
const props = defineProps(['name']);
const age = ref(1000);
defineExpose({ age, name: props.name });
</script>

<template>
  <div class="container">
    <div>姓名：{{ name }}</div>
    <div>年龄：{{ age }}</div>
    </div>
</template>

<style scoped>
.container {
  padding-left: 20px;
}
</style>